﻿namespace ufida.u9.ait.openapi
{
	using System;
	using System.Collections.Generic;
	using System.Text;
    using ufida.u9.ait.openapi.utils;
    using UFIDA.U9.ER.LoanPaying;
    using UFSoft.UBF.AopFrame;	
	using UFSoft.UBF.Util.Context;

	/// <summary>
	/// LoanPayingSaveSV partial 
	/// </summary>	
	public partial class LoanPayingSaveSV 
	{	
		internal BaseStrategy Select()
		{
			return new LoanPayingSaveSVImpementStrategy();	
		}		
	}
	
	#region  implement strategy	
	/// <summary>
	/// Impement Implement
	/// 
	/// </summary>	
	internal partial class LoanPayingSaveSVImpementStrategy : BaseStrategy
	{
		public LoanPayingSaveSVImpementStrategy() { }

		public override object Do(object obj)
		{						
			LoanPayingSaveSV bpObj = (LoanPayingSaveSV)obj;

			return CodeUtils.DocSaveNT<LoanPayingAITDTOData, LoanPaying>(bpObj,
				bpObj.Data,
				LoanPayingBase.SaveDoc,
				(doc) =>
				{
                    LoanPayingBase.SubmitDoc(doc);
                    LoanPayingBase.ApproveDoc(doc);
                    return doc;
				},
                LoanPayingBase.DeleteDoc);
		}		
	}

	#endregion
	
	
}